class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: G = None
        self.x: D = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.t: F = None
        self.o: E = None
        self.v: C = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: A = None
        self.z: E = None
        self.v: C = None
        self.x: E = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: B = None
        self.txt = txt

e = A("e")
c = B("c")
h = C("h")
a = D("a")
l = E("l")
g = F("g")
i = G("i")
f = E("f")

e.z = a
e.x = a
e.w = i
e.q = c
c.s = h
c.v = h
c.r = i
c.t = g
c.o = l
c.y = e
h.v = i
h.u = a
h.t = e
a.p = c
a.s = e
a.o = e
a.z = f
a.x = f
a.v = h
a.u = h
l.r = f
g.z = f
g.w = f
g.q = e
i.u = c
i.w = c
f.r = l
assert a.u.t.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: G = None
        self.x: D = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.t: F = None
        self.o: E = None
        self.v: C = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: A = None
        self.z: E = None
        self.v: C = None
        self.x: E = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: B = None
        self.txt = txt

e = A("e")
c = B("c")
h = C("h")
a = D("a")
l = E("l")
g = F("g")
i = G("i")
f = E("f")

e.z = a
e.x = a
e.w = i
e.q = c
c.s = h
c.v = h
c.r = i
c.t = g
c.o = l
c.y = e
h.v = i
h.u = a
h.t = e
a.p = c
a.s = e
a.o = e
a.z = f
a.x = f
a.v = h
a.u = h
l.r = f
g.z = f
g.w = f
g.q = e
i.u = c
i.w = c
f.r = l
assert a.u.t.q.o.txt == "l"