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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: G = None
        self.u: B = None
        self.t: F = None
        self.p: A = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

a.t = l
a.s = l
a.x = i
a.u = e
b.p = e
b.v = a
i.u = n
i.w = c
n.r = f
n.y = h
n.u = b
n.t = l
n.p = a
n.w = a
n.q = a
e.o = i
e.y = b
l.q = h
f.q = a
f.x = b
f.p = h
f.w = c
c.o = i
c.y = b
h.q = a
h.x = b
h.p = f
h.w = e
assert l.q.x.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: C = None
        self.u: E = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: G = None
        self.u: B = None
        self.t: F = None
        self.p: A = None
        self.w: A = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

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