class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: G = None
        self.s: E = None
        self.z: F = None
        self.o: E = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.w: F = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

h = A("h")
i = B("i")
b = C("b")
m = D("m")
e = E("e")
l = F("l")
c = G("c")

h.u = e
h.s = e
h.o = e
h.v = c
h.z = l
h.w = m
i.s = h
i.v = l
b.y = h
b.t = e
b.u = e
b.w = l
b.s = c
m.s = c
m.p = i
m.r = e
m.o = l
e.y = c
e.u = i
e.o = h
l.y = e
l.o = c
c.y = e
c.w = e
c.p = e
c.u = l
assert l.o.w.y.u.o.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: G = None
        self.s: E = None
        self.z: F = None
        self.o: E = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.w: F = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.w: E = None
        self.p: E = None
        self.txt = txt

h = A("h")
i = B("i")
b = C("b")
m = D("m")
e = E("e")
l = F("l")
c = G("c")

h.u = e
h.s = e
h.o = e
h.v = c
h.z = l
h.w = m
i.s = h
i.v = l
b.y = h
b.t = e
b.u = e
b.w = l
b.s = c
m.s = c
m.p = i
m.r = e
m.o = l
e.y = c
e.u = i
e.o = h
l.y = e
l.o = c
c.y = e
c.w = e
c.p = e
c.u = l
assert l.o.w.y.u.o.w.y.txt == "c"