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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.w: H = None
        self.r: D = None
        self.x: D = None
        self.z: D = None
        self.v: I = None
        self.p: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.w: H = None
        self.r: D = None
        self.x: D = None
        self.z: D = None
        self.v: I = None
        self.p: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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