class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.s: B = None
        self.t: D = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: C = None
        self.w: C = None
        self.y: B = None
        self.s: A = None
        self.v: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: A = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: C = None
        self.w: C = None
        self.y: B = None
        self.s: A = None
        self.v: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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