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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.u: D = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: A = None
        self.u: D = None
        self.x: D = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

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