class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: C = None
        self.r: 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.y: B = None
        self.x: C = None
        self.p: G = None
        self.t: D = None
        self.u: B = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: E = None
        self.p: B = None
        self.z: D = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

j.x = a
j.t = m
j.r = k
l.q = h
m.y = l
m.u = l
m.x = b
m.p = a
m.t = g
m.r = d
m.o = d
g.x = b
g.r = b
g.w = d
g.p = l
g.z = k
g.t = m
d.q = l
d.y = a
d.t = k
h.o = l
h.y = d
a.o = d
a.y = k
k.x = m
k.w = d
k.p = l
k.z = g
k.t = b
k.r = b
b.y = l
b.u = l
b.x = m
b.p = a
b.t = g
b.r = d
b.o = d
f.x = a
f.t = m
f.r = g
assert j.r.x.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: C = None
        self.r: 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.y: B = None
        self.x: C = None
        self.p: G = None
        self.t: D = None
        self.u: B = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: E = None
        self.p: B = None
        self.z: D = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

j.x = a
j.t = m
j.r = k
l.q = h
m.y = l
m.u = l
m.x = b
m.p = a
m.t = g
m.r = d
m.o = d
g.x = b
g.r = b
g.w = d
g.p = l
g.z = k
g.t = m
d.q = l
d.y = a
d.t = k
h.o = l
h.y = d
a.o = d
a.y = k
k.x = m
k.w = d
k.p = l
k.z = g
k.t = b
k.r = b
b.y = l
b.u = l
b.x = m
b.p = a
b.t = g
b.r = d
b.o = d
f.x = a
f.t = m
f.r = g
assert j.r.x.y.q.txt == "h"