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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.s: B = None
        self.q: E = None
        self.r: E = None
        self.p: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: B = None
        self.s: G = None
        self.o: D = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.s: B = None
        self.q: E = None
        self.r: E = None
        self.p: A = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: B = None
        self.s: G = None
        self.o: D = None
        self.t: E = None
        self.v: G = None
        self.txt = txt

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

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

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