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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.w: C = None
        self.p: A = None
        self.x: G = None
        self.z: H = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: F = None
        self.p: H = None
        self.r: G = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: F = None
        self.y: D = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: C = None
        self.w: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

d = A("d")
e = B("e")
g = C("g")
i = D("i")
a = E("a")
c = F("c")
k = G("k")
j = H("j")

d.q = c
d.y = c
d.p = c
d.s = i
d.w = a
d.v = a
d.x = g
d.r = j
e.q = g
e.w = g
e.v = j
e.z = j
e.p = d
e.x = k
e.u = k
g.o = c
g.s = c
g.p = j
g.r = k
g.y = a
g.u = i
i.s = d
a.x = j
a.z = j
a.q = c
a.y = i
c.u = d
k.o = c
k.p = g
k.w = g
k.s = a
j.p = i
assert i.s.r.p.s.y.u.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.w: E = None
        self.x: C = None
        self.y: F = None
        self.r: H = None
        self.v: E = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: H = None
        self.w: C = None
        self.p: A = None
        self.x: G = None
        self.z: H = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: F = None
        self.p: H = None
        self.r: G = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: F = None
        self.y: D = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: C = None
        self.w: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

d = A("d")
e = B("e")
g = C("g")
i = D("i")
a = E("a")
c = F("c")
k = G("k")
j = H("j")

d.q = c
d.y = c
d.p = c
d.s = i
d.w = a
d.v = a
d.x = g
d.r = j
e.q = g
e.w = g
e.v = j
e.z = j
e.p = d
e.x = k
e.u = k
g.o = c
g.s = c
g.p = j
g.r = k
g.y = a
g.u = i
i.s = d
a.x = j
a.z = j
a.q = c
a.y = i
c.u = d
k.o = c
k.p = g
k.w = g
k.s = a
j.p = i
assert i.s.r.p.s.y.u.y.u.txt == "d"