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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.r: D = None
        self.y: C = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.u: B = None
        self.v: B = None
        self.p: B = None
        self.w: E = None
        self.txt = txt

b = A("b")
g = B("g")
l = C("l")
k = D("k")
f = E("f")
c = F("c")
i = C("i")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.r: D = None
        self.y: C = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.u: B = None
        self.v: B = None
        self.p: B = None
        self.w: E = None
        self.txt = txt

b = A("b")
g = B("g")
l = C("l")
k = D("k")
f = E("f")
c = F("c")
i = C("i")

b.r = f
b.u = k
b.y = l
b.v = g
g.w = c
g.y = b
g.t = i
l.s = g
l.x = b
l.t = b
l.r = k
l.v = k
l.y = i
k.z = f
k.u = f
k.r = f
k.s = g
k.o = c
f.p = c
c.s = b
c.y = f
c.w = f
c.u = g
c.v = g
c.p = g
i.s = g
i.x = b
i.t = b
i.r = k
i.v = k
i.y = l
assert l.x.r.p.w.txt == "f"