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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.v: D = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.v: D = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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