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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: A = None
        self.o: A = None
        self.p: F = None
        self.w: C = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

i = A("i")
h = B("h")
n = C("n")
j = D("j")
l = E("l")
b = F("b")
c = G("c")
d = F("d")

i.t = l
h.x = l
h.q = l
h.r = i
h.o = i
h.p = d
h.w = n
h.v = b
n.z = d
n.x = i
j.s = b
j.v = i
j.x = l
j.q = n
j.y = n
j.t = d
l.p = j
l.y = i
b.p = i
b.y = i
c.o = l
d.p = i
d.y = i
assert l.y.t.p.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: A = None
        self.o: A = None
        self.p: F = None
        self.w: C = None
        self.q: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

i = A("i")
h = B("h")
n = C("n")
j = D("j")
l = E("l")
b = F("b")
c = G("c")
d = F("d")

i.t = l
h.x = l
h.q = l
h.r = i
h.o = i
h.p = d
h.w = n
h.v = b
n.z = d
n.x = i
j.s = b
j.v = i
j.x = l
j.q = n
j.y = n
j.t = d
l.p = j
l.y = i
b.p = i
b.y = i
c.o = l
d.p = i
d.y = i
assert l.y.t.p.q.txt == "n"