class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.x: C = None
        self.u: F = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.y: H = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.u: G = None
        self.y: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: B = None
        self.y: H = None
        self.r: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.u: G = None
        self.y: H = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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