class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: G = None
        self.r: D = None
        self.u: G = None
        self.o: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

h = A("h")
e = B("e")
b = C("b")
c = D("c")
k = E("k")
i = F("i")
n = G("n")

h.p = n
h.x = n
h.u = n
h.r = c
h.q = c
h.o = b
e.z = c
e.r = h
b.p = i
b.v = i
b.x = i
b.q = n
b.y = c
b.t = h
c.y = h
k.t = c
k.s = c
k.r = e
i.p = e
n.s = k
n.u = i
n.v = h
assert b.t.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: G = None
        self.r: D = None
        self.u: G = None
        self.o: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

h = A("h")
e = B("e")
b = C("b")
c = D("c")
k = E("k")
i = F("i")
n = G("n")

h.p = n
h.x = n
h.u = n
h.r = c
h.q = c
h.o = b
e.z = c
e.r = h
b.p = i
b.v = i
b.x = i
b.q = n
b.y = c
b.t = h
c.y = h
k.t = c
k.s = c
k.r = e
i.p = e
n.s = k
n.u = i
n.v = h
assert b.t.o.y.txt == "c"