class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.o: D = None
        self.z: E = None
        self.q: G = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: C = None
        self.z: G = None
        self.y: F = None
        self.v: A = None
        self.p: F = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.o: A = None
        self.u: C = None
        self.z: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: C = None
        self.z: G = None
        self.y: F = None
        self.v: A = None
        self.p: F = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: D = None
        self.o: A = None
        self.u: C = None
        self.z: F = None
        self.txt = txt

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

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