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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.o: D = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.q: A = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.t: C = None
        self.x: A = None
        self.o: D = None
        self.q: A = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: B = None
        self.p: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: D = None
        self.o: D = None
        self.t: E = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.q: A = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.t: C = None
        self.x: A = None
        self.o: D = None
        self.q: A = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: B = None
        self.p: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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