class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.y: D = None
        self.p: F = None
        self.s: C = None
        self.o: F = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: G = None
        self.t: H = None
        self.x: F = None
        self.v: D = None
        self.o: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: A = None
        self.w: E = None
        self.r: A = None
        self.v: A = None
        self.x: A = None
        self.t: F = None
        self.txt = txt

b = A("b")
j = B("j")
f = C("f")
n = D("n")
g = E("g")
e = F("e")
m = G("m")
k = H("k")
i = F("i")

b.t = m
b.x = j
b.y = n
b.p = i
b.o = i
b.s = f
b.u = g
b.q = g
j.o = m
f.q = g
f.w = m
f.t = k
f.x = e
f.v = n
f.o = j
n.z = f
n.x = g
n.u = j
n.o = m
g.x = n
g.q = n
g.y = k
e.o = g
e.p = m
m.u = n
m.w = b
k.y = m
k.z = b
k.r = b
k.v = b
k.x = b
k.w = g
k.t = i
i.o = g
i.p = m
assert j.o.u.z.t.r.t.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.y: D = None
        self.p: F = None
        self.s: C = None
        self.o: F = None
        self.u: E = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: G = None
        self.t: H = None
        self.x: F = None
        self.v: D = None
        self.o: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: A = None
        self.w: E = None
        self.r: A = None
        self.v: A = None
        self.x: A = None
        self.t: F = None
        self.txt = txt

b = A("b")
j = B("j")
f = C("f")
n = D("n")
g = E("g")
e = F("e")
m = G("m")
k = H("k")
i = F("i")

b.t = m
b.x = j
b.y = n
b.p = i
b.o = i
b.s = f
b.u = g
b.q = g
j.o = m
f.q = g
f.w = m
f.t = k
f.x = e
f.v = n
f.o = j
n.z = f
n.x = g
n.u = j
n.o = m
g.x = n
g.q = n
g.y = k
e.o = g
e.p = m
m.u = n
m.w = b
k.y = m
k.z = b
k.r = b
k.v = b
k.x = b
k.w = g
k.t = i
i.o = g
i.p = m
assert j.o.u.z.t.r.t.w.s.txt == "f"